﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Radar.Navigation;

namespace Radar.PathFinding
{
    internal class ClosedList
    {

        AStarNode First;

        public void Add(AStarNode newNode)
        {
            newNode.Next = First;
            First = newNode;
        }

        public bool Contains(Waypoint waypoint)
        {
            AStarNode current = First;
            while (current != null)
            {
                if (current.Waypoint == waypoint) return true;
                current = current.Next;
            }
            return false;
        }

    }
}
